/*
 * Static.h
 *
 *  Created on: 2014. 7. 22.
 *      Author: mega
 */

#ifndef GUILDSERVER_NRESOURCE_STATIC_H_
#define GUILDSERVER_NRESOURCE_STATIC_H_

#include <Toolkit/Single.h>
#include <Logger/Static.h>

#include "ResourceGuildBanalce.h"
#include "ResourceGuildBuff.h"
#include "ResourceGuildBuffValue.h"

namespace GuildServer { namespace NResource {

class Static : public ::Toolkit::Single<Static>
{
public:
	Static()
	{
		pGuildBalance	= new ResourceGuildBanalce;
		pGuildBuff		= new ResourceGuildBuff;
		pGuildBuffValue	= new ResourceGuildBuffValue;
	}

	virtual ~Static()
	{
		delete pGuildBalance;
		delete pGuildBuff;
		delete pGuildBuffValue;
	}

public:
	bool	LoadResource()
	{
		if (false == pGuildBalance->LoadResource()) {
			LOG(ERR, " pGuildBalance Load Fail");
			return false;
		}

		if (false == pGuildBuff->LoadResource()) {
			LOG(ERR, " pGuildBuff Load Fail");
			return false;
		}

		if (false == pGuildBuffValue->LoadResource()) {
			LOG(ERR, " pGuildBuffValue Load Fail");
			return false;
		}

		return true;
	}

public:
	ResourceGuildBanalce	* GetGuildBalance() { return pGuildBalance; }
	ResourceGuildBuff		* GetGuildBuff() { return pGuildBuff; }
	ResourceGuildBuffValue	* GetGuildBuffValue() { return pGuildBuffValue; }

private:
	ResourceGuildBanalce	* pGuildBalance;
	ResourceGuildBuff		* pGuildBuff;
	ResourceGuildBuffValue	* pGuildBuffValue;
};

} /*NResource*/ } /*GuildServer*/


#endif /* GUILDSERVER_NRESOURCE_STATIC_H_ */
